<!DOCTYPE html>
<html>

<head>
    <title>我的名片</title>
    <meta name="keywords" content="" />
    <meta name="description" content="">
    <include file="public@head" />
</head>
<body class="bg-light">
    <include file="public@nav" />
    <div class="container">
        <div class="row">
            <div class="col-md-3">
                <include file="public@usernav" />
            </div>
            <div class="col-md-9">
                <div class="card border-0 mb-3">
                    <div class="card-body">
                        我的名片 · <a href="{:url('businesscard/card/add')}">添加名片</a>
                    </div>
                </div>
                <div class="card border-0">
                    <div class="card-body">
                        <table class="table table-bordered table-striped table-hover">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>名称</th>
                                    <th>类型</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <notempty name="cards">
                                    <foreach name="cards" item="vo">
                                        <tr>
                                            <td>{$vo.id}</td>
                                            <td><a href="{:cmf_url('businesscard/Card/index',array('id'=>$vo['id']))}" target="_blank">{$vo.name}</a></td>
                                            <php>
                                                $type = $vo['card_type']== 1 ? "个人名片":"企业名片";
                                            </php>
                                            <td>
                                                {$type}
                                            </td>
                                            <td>
                                                <a href="{:url('businesscard/Card/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                                                <a href="{:url('businesscard/Card/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
                                            </td>
                                        </tr>
                                    </foreach>
                                    <else/>
                                    <tr>
                                        <td colspan="4">您还未添加名片，请点击<a class="btn btn-primary" href="{:url('businesscard/card/add')}">添加名片</a></td>
                                    </tr>
                                </notempty>
                            </tbody>
                        </table>
                        <div class="pagination">{$page|default=''}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- /container -->
    <include file="public@footer" />
    <include file="public@scripts" />
</body>

</html>